<?php

function smarty_function_strip_url($params, &$smarty){
	$querystring = $_SERVER['QUERY_STRING'];
	$parameters = explode("&",$querystring);
	$join=!$params['join']?'-':'/';

	$newarr =array();
	foreach($parameters as $v){
		$arr=explode("=",$v);
		if(!strstr($params['exc'],$arr[0])){
			$v=implode("-",$arr);
			array_push($newarr,$v);
		}
	}
	$newurl = implode($join,$newarr);
	if($newurl){$newurl.=$join;}
	
	if (empty($params['assign'])) {
		return $newurl;
	} else {
		$smarty->assign($params['assign'],$newurl);
	}
}

?>
